package com.hap.bank.service.impl;

import com.github.pagehelper.PageHelper;
import com.hand.hap.system.service.impl.BaseServiceImpl;
import com.hap.bank.dto.HandAccountInfo;
import com.hap.bank.mapper.HandAccountMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hap.bank.dto.HandAccount;
import com.hap.bank.service.IHandAccountService;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional(rollbackFor = Exception.class)
public class HandAccountServiceImpl extends BaseServiceImpl<HandAccount> implements IHandAccountService{
    @Autowired
    HandAccountMapper handAccountMapper;

    @Override
    public List<HandAccount> selectAccountInfo(HandAccountInfo handAccountInfo,int pageSize,int pageNum) {
        PageHelper.startPage(pageNum,pageSize);
        return handAccountMapper.selectAccountInfo(handAccountInfo);
    }

    @Override
    public HandAccount selectAccountByNum(String bankAccountNum) {
        return handAccountMapper.selectAccountByNum(bankAccountNum);
    }
}